package com.bw.z.network;

import com.bw.z.db.UserTable;
import com.bw.z.mvp.model.entity.BaseEntity;
import com.bw.z.mvp.model.entity.ChannelEntity;
import com.bw.z.mvp.model.entity.CommentEntity;
import com.bw.z.mvp.model.entity.FileEntity;
import com.bw.z.mvp.model.entity.FollowEntity;
import com.bw.z.mvp.model.entity.ImageBannerEntity;
import com.bw.z.mvp.model.entity.LiveCommentEntity;
import com.bw.z.mvp.model.entity.LiveEntity;
import com.bw.z.mvp.model.entity.LocalChannel;
import com.bw.z.mvp.model.entity.LoginEntity;
import com.bw.z.mvp.model.entity.MoreChannel;
import com.bw.z.mvp.model.entity.NewsEntity;
import com.bw.z.mvp.model.entity.RecommendEntity;
import com.bw.z.mvp.model.entity.RegisterEntity;
import com.bw.z.mvp.model.entity.ResultEntity;
import com.bw.z.mvp.model.entity.TextBannerEntity;
import com.bw.z.mvp.model.entity.TokenEntity;
import com.bw.z.mvp.model.entity.UserFollowEntity;
import com.bw.z.mvp.model.entity.VideoNewsEntity;

import java.util.List;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;

public interface Api {

    //    String BaseUrl = "http://118.195.161.134:8088/";//生产环境地址
    String BaseUrl = "http://118.195.161.134:8066/";//测试环境地址
    String FileUrl = "http://118.195.161.134:8066/fileDownload?fileName=";

    @POST("sysToken/getToken")
    Observable<TokenEntity> requestToken(@Body RequestBody body);

    @POST("sysToken/testToken")
    Observable<ResultEntity> requestTest();

    @POST("sysUser/loginUser")
    Observable<LoginEntity> requestLogin(@Body RequestBody body);

    @POST("sysUser/registerUser")
    Observable<RegisterEntity> requestRegister(@Body RequestBody body);

    @Multipart
    @POST("fileUpload")
    Observable<FileEntity> requestFile(@Part List<MultipartBody.Part> partList);

    @POST("sysUser/updateUser")
    Observable<UserTable> requestUpdateUser(@Body RequestBody body);

    @POST("sysNews/channelNews")
    Observable<NewsEntity> requestNews(@Body RequestBody body);

    @POST("sysChannel/userChannel")
    Observable<ChannelEntity> requestUserChannels(@Body RequestBody body);

    @POST("sysBanner/textBannerNews")
    Observable<TextBannerEntity> requestTextBanner();

    @POST("sysBanner/bannerNews")
    Observable<ImageBannerEntity> requestImageBanner();

    @POST("sysNews/hotNews")
    Observable<RecommendEntity> requestRecommendNews();

    @POST("sysNews/followNews")
    Observable<FollowEntity> requestFollowNews(@Body RequestBody body);

    @POST("sysFollow/selFollow")
    Observable<UserFollowEntity> requestUserFollow(@Body RequestBody body);

    @POST("sysNews/videoNews")
    Observable<VideoNewsEntity> requestVideoNews(@Body RequestBody body);

    @POST("sysLive/selLive")
    Observable<LiveEntity> requestLiveNews(@Body RequestBody body);

    @POST("sysComment/selComment")
    Observable<CommentEntity> requestComments(@Body RequestBody body);

    @POST("sysComment/addComment")
    Observable<BaseEntity> requestAddComment(@Body RequestBody body);

    @POST("sysLiveComment/selLiveComment")
    Observable<LiveCommentEntity> requestSelLiveComment(@Body RequestBody body);

    @POST("sysLiveComment/addComment")
    Observable<BaseEntity> requestLiveAddComment(@Body RequestBody body);

    @POST("sysCollectionNews/isCollectionNews")
    Observable<BaseEntity> requestIsCollectionNews(@Body RequestBody body);

    @POST("sysCollectionNews/addCollectionNews")
    Observable<BaseEntity> requestAddCollectionNews(@Body RequestBody body);

    @POST("sysCollectionNews/delCollectionNews")
    Observable<BaseEntity> requestDelCollectionNews(@Body RequestBody body);

    @POST("sysChannel/moreChannel")
    Observable<MoreChannel> requestMoreChannels(@Body RequestBody body);

    @POST("sysChannel/localChannel")
    Observable<LocalChannel> requestLocalChannels(@Body RequestBody body);

    @POST("sysChannel/collectionChannel")
    Observable<BaseEntity> requestCollectionChannels(@Body RequestBody body);
}
